import java.util.ArrayList;
import java.util.List;
public class BranchCourse extends GKAbstractCourse {

    private List<GKAbstractCourse> courseList = new ArrayList();

    private int level;

    public BranchCourse(String name, String score, int level) {
        super(name, score);
        this.level = level;
    }

    public void addChild(GKAbstractCourse course) {
        courseList.add(course);
    }

    public void info() {
        System.out.println("课程：" + this.name + ",分数：" + this.score);
        for (GKAbstractCourse course : courseList) {
            for(int i = 0; i < level; i ++) {
                System.out.print(" ");
            }
            System.out.print(">");
            course.info();
        }
        
    }
}